package com.bussiness.xutai.controller;

import com.bussiness.xutai.bean.ShoppingCart;
import com.bussiness.xutai.bean.User;
import com.bussiness.xutai.service.ShoppingCartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class ShoppingCartController {

    @Autowired
    ShoppingCartService shoppingCartService;

    @RequestMapping("select_ShoppingCart")
    @ResponseBody
    public List<ShoppingCart> getAllByUser(User user){
        return shoppingCartService.getAllByUser(user);
    }
}
